/*
 * FunctionProtoAst.h
 *
 *  Created on: 19 Nov 2010
 *      Author: kn308
 */

#ifndef FUNCTIONPROTOAST_H_
#define FUNCTIONPROTOAST_H_

#include <MAlice/Ast/TypeAst.h>
#include <MAlice/Ast/ListAst.h>

namespace MAlice
{

class FunctionProtoAst: public MAlice::Ast
{
private:
	string mName;
	TypeAst* mReturnType;
	ListAst* mParameters; // list of FunctionParameterAst*

public:
	FunctionProtoAst(location loc, const string& name, TypeAst* returnType,
			ListAst* parameters);
	virtual ~FunctionProtoAst();
	virtual llvm::Value* generate();

	inline const string & getName()
	{
		return mName;
	}

	inline TypeAst* getReturnType()
	{
		return mReturnType;
	}

	inline ListAst* getParameters()
	{
		return mParameters;
	}
};

}

#endif /* FUNCTIONPROTOAST_H_ */
